<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST, ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace plugin\sms\admin\model;
use \temmoku\db;
class index {
	public function get_data(){
		$path =APP_PATH.PLUGIN.'data/';
		if ( $handle  =  @opendir ( $path )) {
			while (( $file  =  readdir ( $handle ))!== false) {
			    if($file==='.' || $file==='..'){
			     	continue;
			    }
			    $dir=$path.$file;
			    if(is_file($dir)){
			    	$data = include_once $dir;
			    	$row=db::select('*')->from(P_jab.'list')->where("  `initial_name` LIKE '$data[initial_name]'")->row();
			    	if($row){
			    		$data=$data+$row;
			    		$data['is_install']='1';
			    	}else{
			    		$data['is_install']='0';
			    	}
			    	$dataDB[]=$data;
			    }
				
			}
			//关闭打开的目录
			closedir ( $handle );
		}
		return $dataDB;
	}
}
?>